<?php

namespace app\admin\validate;

use think\Validate;

class News extends Validate
{
    protected $rule =   [
        'category_id'  => 'require',   
        'title' => 'require',	
        'summary' => 'require',	
        'author' => 'require',	
        'image' => 'require',	
        'content' => 'require'	
    ];
    
    protected $message  =   [
        'category_id.require' => '分类ID不能为空',
        'title.require' => '资讯标题不能为空',
		'summary.require' => '资讯摘要不能为空',
		'author.require' => '作者不能为空',
		'image.require' => '图片链地址不能为空',
		'content.require' => '资讯内容不能为空'
    ];  
}